

<include file="Public/head"/><body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>
            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>

                <!-- /section:settings.box -->
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <div class="cf">
                            <form class="form-inline" action="" method="get">
                                <a class="btn btn-info" href="{:U('addchapter',array('novel_id'=>$novel_id))}" value="">新增</a>
                            </form>
                        </div>
                        <div class="space-4"></div>
                        <div class="container-fluid">
        <div class="row">
        <div class="col-sm-3" style='width:300px' >
        	 <div>
			
				<td><img src= "{$novel['img']}"  /></td>
				
			</div>
        	 
            <img style="max-width:100%">
            <h4></h4>
            <div style="line-height: 1.7em;margin-top:10px;" class="text-muted">
                作者: {$novel["writer"]} <br>
                字数: {$novel["word_count"]}<br>
            </div>
            <div class="text-muted" style="margin-top:10px;line-height: 1.7em;">
               </div>
        </div>
        <div class="col-sm-9">
							<form id="form" method="post" action="{:U('del')}">
                            <table class="table table-striped table-bordered">
                                <thead>
                                <tr>
                                    <th class="center"><input class="check-all" type="checkbox" value=""></th>
                                    <th>小说章节</th>
                                    <th class="col-xs-7">章节名称</th>
                                    <th>所属小说</th>
                                    <th>添加时间</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <volist name="list" id="val">
                                    <tr>
                                        <td class="center"><input class="aids" type="checkbox" name="id[]" value="{$val['id']}"></td>
                                        <td>{$val['chapter']}</td>
                                        <td>{$val['title']}</td>
                                        <td>{$val['novel_name']}</td>
                                        <td>{$val['add_time']}</td>
                                        <td>
                                        <a href="{:U('editchapter',array('id'=>$val['id']))}"><iclass="ace-icon fa fa-pencil bigger-100"></i>修改</a>
                                        &nbsp&nbsp;
                                        <a href="javascript:;" val="{:U('chapterdel',array('id'=>$val['id']))}" class="del"><i class="ace-icon fa fa-trash-o bigger-100 red"></i>删除</a></td>
                                    </tr>
                                </volist>
                                </tbody>
                            </table>
                        </form>

    </div>
</div>
                        <div class="cf" style='margin-left:300px' >
                            <input id="submit" class="btn btn-info" type="button" value="删除">
                            {$page}
                        </div>
                        
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script type="text/javascript">
    $(function () {
        $(".check-all").click(function () {
            $(".aids").prop("checked", this.checked);
        });
        $(".aids").click(function () {
            var option = $(".ids");
            option.each(function (i) {
                if (!this.checked) {
                    $(".check-all").prop("checked", false);
                    return false;
                } else {
                    $(".check-all").prop("checked", true);
                }
            });
        });
        $("#submit").click(function () {
            bootbox.confirm({
                title: "系统提示",
                message: "是否要删除所选文章？",
                callback: function (result) {
                    if (result) {
                        $("#form").submit();
                    }
                },
                buttons: {
                    "cancel": {"label": "取消"},
                    "confirm": {
                        "label": "确定",
                        "className": "btn-danger"
                    }
                }
            });
        });
        $(".del").click(function () {
            var url = $(this).attr('val');
            bootbox.confirm({
                title: "系统提示",
                message: "是否要该文章？",
                callback: function (result) {
                    if (result) {
                        window.location.href = url;
                    }
                },
                buttons: {
                    "cancel": {"label": "取消"},
                    "confirm": {
                        "label": "确定",
                        "className": "btn-danger"
                    }
                }
            });
        });
    })
</script>
</body>
</html>
